<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>弓友之家</title>
    <link rel="stylesheet" href="css/mui.css" />
    <link rel="stylesheet" href="fonts/iconfont.css" />
    <link rel="stylesheet" href="css/style.css" />
    <style>
    	form{padding: 10px;}
    	form label{padding-bottom: 5px; color: #444; font-size: 15px; display: block;}
    	form input{padding: 10px !important; height: 35px !important; font-size: 14px; color: #444;}
    	form button{width: 100%; padding: 10px; margin-top: 20%; background: #ED7F04; color: #fff; border: 1px solid #ED7F04;}
    </style>
</head>
<body>
	<header class="mui-bar mui-bar-nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title">修改昵称</h1>
	</header>
	<div class="mui-content">
		<form>
			<label>新昵称</label>
			<input type="text" id="nickname" placeholder="请输入新昵称" />
			<div class="mui-button-row">
				<button type="button" onclick="sub()">确认提交</button>
			</div>
		</form>
	</div>
	<br />
	<script type="text/javascript" src="js/mui.min.js" ></script>
	<script type="text/javascript" src="js/jquery-1.8.3.min.js" ></script>
	<script type="text/javascript" src="js/common.js" ></script>
	<script type="text/javascript" charset="utf-8">
       	 function sub(){
       	 	var nickname=$("#nickname").val();
       	 	mui.ajax(H_SRC+'/amier/user/change_nickname',{
				data:{
					token:token,
					nickname:nickname
				},
				dataType:'json',
				type:'post',
				timeout:10000,             
				success:function(data){
					mui.toast("昵称修改成功！");
					mui.back();
					var wobj = plus.webview.getWebviewById("user.html");
          			wobj.reload(true);
				},
				error:function(){
					
				}
			}) 
       	 }
    </script>
</body>
</html>